<?php 
session_start();
header("Content-type:text/html;charset=utf-8");

$consult_id = $_SESSION['ID'];
$user_name = $_POST['name'];
$createtime = $_POST['createtime'];
$content = $_POST['content'];

$conn = 	$conn = mysqli_connect('127.0.0.1','root','pwd','admin',3306);

mysqli_set_charset($conn,'utf8');

if( mysqli_query($conn,"UPDATE liuyan SET content='{$content}',createtime='{$createtime}',user_name='{$user_name}' WHERE id='{$consult_id}'")){
				echo "<script>alert('修改成功');location='consult.php'</script>";
			}else{
				echo "<script>alert('修改失败');location='consult.php'</script>";
			}

 ?>